package com.java2_28_3;

public class AnimalDemo {
    public static void main(String[] args) {
        Jumpping j = new Cat();
        j.jump();
        System.out.println("--------");

        Animal a = new Cat();
        a.setName("加菲");
        a.setAge(5);
        System.out.println(a.getName() + ", " + a.getAge());
        a.eat();

        a = new Cat("加菲2", 10);
        System.out.println(a.getName() + ", " + a.getAge());
        a.eat();

        Cat c = new Cat();
        c.setName("加菲3");
        c.setAge(15);
        System.out.println(c.getName() + ", " + c.getAge());
        c.eat();
        c.jump();

    }
}
